package com.gwd.task.repository;

import com.gwd.task.entity.EventsProcessEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhiyongming
 * @date 2020/12/16 14:36
 */
@Repository
public interface EventsProcessRepository extends JpaRepository<EventsProcessEntity, Long> {
    @Query(value = "select u from EventsProcessEntity u where u.eventId = ?1 order by u.epId desc ")
    List<EventsProcessEntity> findByEventId(Long eId);
    @Query(value = "select u from EventsProcessEntity u where u.eventId in ?1 order by u.epId desc ")
    List<EventsProcessEntity> findByEventIdIn(List<Long> ids);
}
